package com.aps.demo.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.List;

// 导入公共模块中的模型类
import com.aps.common.model.OrderAbandoned;
import com.aps.common.model.ProductInfo;
import com.aps.common.model.EquipmentAbandoned;

/**
 * 生产数据输入模型
 * 整合所有从外部系统获取的生产相关数据
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "生产数据输入模型")
public class ProductionData {
    
    @NotNull(message = "产品信息不能为空")
    @Valid
    @JsonProperty("productInfo")
    @Schema(description = "产品信息")
    private ProductInfo productInfo;
    
    @NotNull(message = "订单信息不能为空")
    @Valid
    @JsonProperty("orders")
    @Schema(description = "订单信息列表")
    private List<OrderAbandoned> orders;
    
    @NotNull(message = "工艺流程不能为空")
    @Valid
    @JsonProperty("processFlow")
    @Schema(description = "工艺流程步骤列表")
    private List<ProcessStep> processFlow;
    
    @NotNull(message = "设备信息不能为空")
    @Valid
    @JsonProperty("equipment")
    @Schema(description = "设备信息列表")
    private List<EquipmentAbandoned> equipment;
    
    @NotNull(message = "人员信息不能为空")
    @Valid
    @JsonProperty("personnel")
    @Schema(description = "人员信息列表")
    private List<Personnel> personnel;
    
    @NotNull(message = "约束条件不能为空")
    @Valid
    @JsonProperty("constraints")
    @Schema(description = "约束条件")
    private Constraint constraints;
} 